﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="SurchargeSegs.aspx.cs" Inherits="IFD2.SurchargeSegs" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <link href="Datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css"/>

    <form id="form1" runat="server" role="form" class="form-inline" defaultbutton="lbtnQuery">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate>
    <div class="container-fluid body-content" style="width:100%;">

    <div class="row">
        <div class="col-sm-2 well well-sm">
            <h5><asp:Literal ID="litTitle" runat="server" meta:resourcekey="tipPageTitle"></asp:Literal></h5>
            <div class="form-group">
                <asp:Label ID="Label1" runat="server" Text="Surcharge Code:" meta:resourcekey="SurchargeCode"></asp:Label><br />
                <asp:Label ID="lblSurchargeCode" runat="server" Text="" Font-Bold="true"></asp:Label>
            </div>
            <br class="hidden-xs"/><br class="hidden-xs"/>
            <div class="form-group">
                <asp:Label ID="Label6" runat="server" Text="Flt. Surcharge Types:" meta:resourcekey="FltSurchargeTypes"></asp:Label><br />
                <asp:Label ID="lblFltSurchargeTypes" runat="server" Text="" Font-Bold="true"></asp:Label>
            </div>
            <br class="hidden-xs"/><br class="hidden-xs"/>
            <div class="form-group">
                <asp:Label ID="Label4" runat="server" Text="Effective Time:" meta:resourcekey="EffectiveTime"></asp:Label><br />
                <asp:Label ID="lblEffectiveTime" runat="server" Text="" Font-Bold="true"></asp:Label>
            </div>
            <br class="hidden-xs"/><br class="hidden-xs"/>
            <asp:LinkButton ID="lbtnQuery" runat="server" CssClass="form-control input-sm btn-primary text-center" Width="100%" ToolTip="" meta:resourcekey="tipQuery" OnClick="lbtnQuery_Click"> <span class="glyphicon glyphicon-search" style="font-size:large;"></span></asp:LinkButton>
            <p></p><%--没有此行(或&nbsp;)，上面的按钮在手机模式(xs)下，只有上半部可以点击！--%>
            <asp:Label ID="lblError" runat="server" CssClass="ifdMessage"></asp:Label>
        </div>

        <div class="col-sm-10 well well-sm">
            <div class="panel">
                <div class="panel-heading btn-primary">
                    <h6 class="panel-title" id="section-2"><asp:Literal ID="Literal1" runat="server" meta:resourcekey="tipPageTitle"></asp:Literal></h6>
                </div>
                <div class="panel-body">
                    <div class="well well-sm">
                        <asp:Label ID="Label2" runat="server" Text="Ori. Airport:" meta:resourcekey="OriAirport"></asp:Label>
                        <asp:TextBox ID="txtOriAirport" runat="server" MaxLength="10" Width="80px"></asp:TextBox>
                        <asp:Label ID="Label3" runat="server" Text="Des. Airport:" meta:resourcekey="DesAirport"></asp:Label>
                        <asp:TextBox ID="txtDesAirport" runat="server" MaxLength="10" Width="80px"></asp:TextBox>
                        <asp:Button ID="btnAddSeg" runat="server" Text="Add" meta:resourcekey="AddSeg" OnClick="btnAddSeg_Click"/><br />
                        <asp:Label ID="Label5" runat="server" Text="Tips: * = All airports" meta:resourcekey="tips" Font-Italic="true"></asp:Label>
                        <asp:SqlDataSource ID="sqlAirports" runat="server" ConnectionString="<%$ ConnectionStrings:IFD_DB %>" SelectCommand="bll_airport_get_codes" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                    </div>

                    <div class="table-responsive">
                        <asp:GridView ID="grdSegments" runat="server" AutoGenerateColumns="False" CellPadding="4" DataSourceID="sqlSegments" ForeColor="#333333" GridLines="None" class="table-hover" style="min-width:300px;width:100%;">
                            <AlternatingRowStyle BackColor="White" />
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                    <input name="KEY" type="radio" value='<%# Eval("ori_airport")+"|"+Eval("des_airport") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="ori_airport" HeaderText="ori_airport" SortExpression="ori_airport" meta:resourcekey="ori_airport"/>
                                <asp:BoundField DataField="des_airport" HeaderText="des_airport" SortExpression="des_airport" meta:resourcekey="des_airport"/>
                                <asp:BoundField DataField="done_user" HeaderText="done_user" SortExpression="done_user" meta:resourcekey="done_user" />
                                <asp:BoundField DataField="done_time" HeaderText="done_time" SortExpression="done_time" meta:resourcekey="done_time" />
                            </Columns>
                            <EditRowStyle BackColor="#2461BF" />
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <RowStyle BackColor="#EFF3FB" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <SortedAscendingCellStyle BackColor="#F5F7FB" />
                            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                            <SortedDescendingCellStyle BackColor="#E9EBEF" />
                            <SortedDescendingHeaderStyle BackColor="#4870BE" />
                        </asp:GridView>
                        <asp:SqlDataSource ID="sqlSegments" runat="server" ConnectionString="<%$ ConnectionStrings:IFD_DB %>" SelectCommand="bll_surcharge_get_segments" SelectCommandType="StoredProcedure">
                            <SelectParameters>
                                <asp:SessionParameter Name="airline" SessionField="AIRLINE" Type="String" />
                                <asp:ControlParameter ControlID="lblSurchargeCode" Name="code" PropertyName="Text" Type="String" />
                                <asp:ControlParameter ControlID="lblFltSurchargeTypes" Name="flt_surcharge_types" PropertyName="Text" Type="String" />
                                <asp:ControlParameter ControlID="lblEffectiveTime" Name="effective_time" PropertyName="Text" Type="DateTime" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </div>

                    <div class="btn-group">
                        <asp:Button ID="btnDelete" runat="server" CssClass="btn btn-sm btn-default" Text="Delete" OnClick="btnDelete_Click"  meta:resourcekey="Delete" /><br />
                    </div>

                    
                </div>
            </div>
        </div>
    </div>

    <div id="targetDiv" style="position:absolute;border:solid 1px black; z-index:20000; background-color:White; display:none;">test</div>

    </div>
    </ContentTemplate></asp:UpdatePanel>
    </form>
    <script src="JS/city_suggestion.min.js"></script>
</asp:Content>
